import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: { path: '/view1' },
      component: () => import('@/views/HomeView.vue'),
      children: [
        {
          path: 'view1',

          component: () => import('@/views/View1.vue'),
          meta: {
            title: '上市公司全景概览'
          }
        },
        {
          path: 'view2',
          component: () => import('@/views/View2.vue')
        },
        {
          path: 'view3',
          component: () => import('@/views/View3.vue')
        }
      ]
    },

    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/Login.vue')
    }
  ]
})

export default router
